package com.open.basic.constant;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * @author: system
 * @Date: 2024/11/16 上午11:09
 * @Version: V1.0
 * @description: | 通用字段
 */

public class CommonEntityField implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 创建人名称
     */
    private String creator_name;

    /**
     * 修改人
     */
    private String updater;

    /**
     * 修改人名称
     */
    private String updater_name;

    public Long getId() {
        return id;
    }

    public CommonEntityField setId(final Long id) {
        this.id = id;
        return this;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public CommonEntityField setCreateTime(final LocalDateTime createTime) {
        this.createTime = createTime;
        return this;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public CommonEntityField setUpdateTime(final LocalDateTime updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public String getCreator() {
        return creator;
    }

    public CommonEntityField setCreator(final String creator) {
        this.creator = creator;
        return this;
    }

    public String getCreator_name() {
        return creator_name;
    }

    public CommonEntityField setCreator_name(final String creator_name) {
        this.creator_name = creator_name;
        return this;
    }

    public String getUpdater() {
        return updater;
    }

    public CommonEntityField setUpdater(final String updater) {
        this.updater = updater;
        return this;
    }

    public String getUpdater_name() {
        return updater_name;
    }

    public CommonEntityField setUpdater_name(final String updater_name) {
        this.updater_name = updater_name;
        return this;
    }
}
